<template>
    <Card :bordered="false" dis-hover style="margin-bottom: 56px;">
        <div class="sky-patient">
            <Tabs
                v-model="currentTab"
                name="a"
                :animated="false"
                @on-click="askDatas">
                <TabPane
                    :label="`新增（${totallist.add || 0}）`"
                    name="add"
                    tab="a"
                ></TabPane>
                <TabPane
                    :label="`预到（${totallist.order_arrive || 0}）`"
                    name="preArrival"
                    tab="a"
                ></TabPane>
                <TabPane
                    :label="`已到（${totallist.arrive || 0}）`"
                    name="arrived"
                    tab="a"
                ></TabPane>
                <TabPane
                    :label="`过期未到（${totallist.unarrive || 0}）`"
                    name="overdue"
                    tab="a"
                ></TabPane>
                <TabPane
                    :label="`预约（${totallist.oprate_arrive || 0}）`"
                    name="ordered"
                    tab="a"
                ></TabPane>
                <TabPane
                    :label="`改约（${totallist.change_arrive || 0}）`"
                    name="revision"
                    tab="a"
                ></TabPane>
            </Tabs>
            <div class="ivu-mt-8">
                <jgSearch
                    :searchData="searchData"
                    @on-change-change="getDatas"
                    @on-change-changes="getDatass"
                    @on-enter-input="inputaskData"
                    @on-clear-input="inputaskData"
                    @on-change-changecasc="changecasc">
                    <template v-slot:addcheck>
                        <Row type="flex">
                            <Col>
                                <CheckboxGroup @on-change="checkbox">
                                    <Checkbox label="我的关注"></Checkbox>
                                </CheckboxGroup>
                            </Col>
                            <Col>
                                <CheckboxGroup @on-change="checkbox1">
                                    <Checkbox label="电话"></Checkbox>
                                </CheckboxGroup>
                            </Col>
                            <Col>
                                <CheckboxGroup @on-change="checkbox2">
                                    <Checkbox
                                        label="微信"
                                    ></Checkbox> </CheckboxGroup
                            ></Col>
                            <Col>
                                <CheckboxGroup @on-change="checkbox3">
                                    <Checkbox
                                        label="重复"
                                    ></Checkbox> </CheckboxGroup
                            ></Col>
                        </Row>
                    </template>
                    <template v-slot:addradio>
                        <RadioGroup
                            type="button"
                            v-model="type1"
                            @on-change="changetype(type1)"
                        >
                            <Radio :label="5">月</Radio>
                        </RadioGroup>
                    </template>
                    <template v-slot:preArrivalradio>
                        <RadioGroup
                            type="button"
                            v-model="type2"
                            @on-change="changetype(type2)"
                        >
                            <Radio :label="2">今</Radio>
                            <Radio :label="3">明</Radio>
                            <Radio :label="4">周</Radio>
                            <Radio :label="5">月</Radio>
                        </RadioGroup>
                    </template>
                    <template v-slot:arrivedradio>
                        <RadioGroup
                            type="button"
                            v-model="type3"
                            @on-change="changetype(type3)"
                        >
                            <Radio :label="2">今</Radio>
                            <Radio :label="1">昨</Radio>
                            <Radio :label="5">月</Radio>
                        </RadioGroup>
                    </template>
                    <template v-slot:orderedradio>
                        <RadioGroup
                            type="button"
                            v-model="type5"
                            @on-change="changetype(type5)"
                        >
                            <Radio :label="2">今</Radio>
                            <Radio :label="1">昨</Radio>
                            <Radio :label="5">月</Radio>
                        </RadioGroup>
                    </template>
                    <template v-slot:city1>
                        <Select
                            v-model="city_id1"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity1"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                    <template v-slot:city2>
                        <Select
                            v-model="city_id2"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity2"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                    <template v-slot:city3>
                        <Select
                            v-model="city_id3"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity3"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                    <template v-slot:city4>
                        <Select
                            v-model="city_id4"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity4"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                    <template v-slot:city5>
                        <Select
                            v-model="city_id5"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity5"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                    <template v-slot:city6>
                        <Select
                            v-model="city_id6"
                            placeholder="请输入城市"
                            filterable
                            remote
                            clearable
                            :remote-method="remoteMethod"
                            @on-change="getcityDatas"
                            :loading="loadingcity"
                        >
                            <Option
                                v-for="(item, index) in optionscity6"
                                :key="index"
                                :value="item.value"
                                :label="item.label"
                                >{{ item.label }}</Option
                            >
                        </Select>
                    </template>
                </jgSearch>
            </div>
            <div class="i-table-no-border">
                <Table
                    highlight-row
                    ref="table"
                    :columns="columns"
                    :data="list"
                    :loading="loading"
                    size="small"
                    :max-height="500"
                    @on-filter-change="handleFilterChange"
                    @on-sort-change="sortchange"
                >
                    <template slot-scope="{ row }" slot="info">
                        <a @click="handleDetailPatient(row)"
                            ><Icon
                                type="ios-water"
                                v-if="+row.is_share === 1"
                            />{{ row.true_name || row.user_name }}
                            {{ row.gender_str }} {{ row.age }}</a
                        >
                    </template>
                    <template slot-scope="{ row }" slot="state">
                        <Tag v-if="row.status_name === '失效'" color="blue">{{
                            row.status_name
                        }}</Tag>
                        <Tag
                            v-else-if="row.status_name === '跟进中'"
                            color="volcano"
                            >{{ row.status_name }}</Tag
                        >
                        <Tag
                            v-else-if="row.status_name === '预约'"
                            color="cyan"
                            >{{ row.status_name }}</Tag
                        >
                        <Tag
                            v-else-if="row.status_name === '到诊'"
                            color="green"
                            >{{ row.status_name }}</Tag
                        >
                        <Tag
                            v-else-if="row.status_name === '已到老患者'"
                            color="orange"
                            >{{ row.status_name }}</Tag
                        >
                        <Tag v-else-if="row.status_name" color="orange">{{
                            row.status_name
                        }}</Tag>
                    </template>
                    <template slot-scope="{ row }" slot="label">
                        <Poptip
                            word-wrap
                            trigger="hover"
                            placement="right"
                            maxWidth="400"
                        >
                            <Tag
                                color="default"
                                v-for="(item, index) in row.tags_name"
                                :key="index"
                                v-if="index < 3"
                                >{{ item.replace(/[\r\n]/g, "") }}</Tag
                            >
                            <div slot="content">
                                <Tag
                                    color="default"
                                    v-for="(item, index) in row.tags_name"
                                    :key="index"
                                    >{{ item.replace(/[\r\n]/g, "") }}</Tag
                                >
                            </div>
                        </Poptip>
                    </template>
                    <template slot-scope="{ row }" slot="labels">
                        <Poptip
                            word-wrap
                            trigger="hover"
                            placement="right"
                            maxWidth="400"
                        >
                            <Tag
                                color="default"
                                v-for="(item, index) in row.body_parts"
                                :key="index"
                                v-if="index < 3"
                                >{{ item.replace(/[\r\n]/g, "") }}</Tag
                            >
                            <div slot="content">
                                <Tag
                                    color="default"
                                    v-for="(item, index) in row.body_parts"
                                    :key="index"
                                    >{{ item.replace(/[\r\n]/g, "") }}</Tag
                                >
                            </div>
                        </Poptip>
                        <!-- <Tooltip content="Bottom Center text" placement="bottom">
                            <Tag v-if="+index <= 2" v-for="(item, index) in row.body_parts" :key="index">{{ item }}
                            </Tag>
                            <Tag slot="content" v-for="(item, index) in row.body_parts" :key="index">{{ item }}</Tag>
                        </Tooltip> -->
                    </template>
                    <template slot-scope="{ row }" slot="disease">
                        <span>{{
                            row.child_diseases_name || row.diseases_name
                        }}</span>
                    </template>
                    <template slot-scope="{ row }" slot="channel">
                        <Badge
                            v-if="row.source_name === 0"
                            status="success"
                            :text="row.source_name"
                        />
                        <Badge
                            v-if="row.source_name === 1"
                            status="processing"
                            :text="row.source_name"
                        />
                        <Badge
                            v-if="row.source_name === 2"
                            status="error"
                            :text="row.source_name"
                        />
                        <Badge
                            v-if="row.source_name === 3"
                            status="warning"
                            :text="row.source_name"
                        />
                        <span>{{ row.source_name }}</span>
                    </template>
                    <template slot-scope="{ row, index }" slot="action">
                        <a
                            v-hasC="{
                                name: 'patient-index-edit-info1',
                                flag: 'v1/patient/index/edit-info',
                            }"
                            @click="handleOpenDrawer(row)"
                            >编辑</a
                        >
                        <Divider
                            type="vertical"
                            v-if="+row.repeat_type > 0"
                            v-hasC="{
                                name: 'v1-patient-index-repeat-list',
                                flag: 'v1/patient/index/repeat-list',
                            }"
                        />
                        <a
                            @click="copypatient(row)"
                            v-hasC="{
                                name: 'v1-patient-index-repeat-list',
                                flag: 'v1/patient/index/repeat-list',
                            }"
                            v-if="+row.repeat_type > 0"
                            >重复</a
                        >
                        <Divider
                            type="vertical"
                            v-if="+row.is_delete === 1"
                            v-hasC="btnShows"
                        />
                        <a
                            @click="delpatient(row)"
                            v-if="+row.is_delete === 1"
                            v-hasC="btnShows"
                            style="color: red;"
                            >删除</a
                        >
                    </template>
                    <template slot-scope="{ row, index }" slot="actions">
                        <a
                            v-hasC="{
                                name: 'patient-index-edit-info1',
                                flag: 'v1/patient/index/edit-info',
                            }"
                            @click="handleOpenDrawer(row)"
                            >编辑</a
                        >
                        <Divider type="vertical" v-if="+row.op_type === 2" />
                        <a
                            v-hasC="{
                                name: 'patient-index-cancel-arrive1',
                                flag: 'v1/patient/index/cancel-arrive',
                            }"
                            @click="handleVisit(row)"
                            v-if="+row.op_type === 2"
                            >撤诊</a
                        >
                        <Divider
                            type="vertical"
                            v-if="+row.repeat_type > 0"
                            v-hasC="{
                                name: 'v1-patient-index-repeat-list',
                                flag: 'v1/patient/index/repeat-list',
                            }"
                        />
                        <a
                            @click="copypatient(row)"
                            v-hasC="{
                                name: 'v1-patient-index-repeat-list',
                                flag: 'v1/patient/index/repeat-list',
                            }"
                            v-if="+row.repeat_type > 0"
                            >重复</a
                        >
                    </template>
                </Table>
                <div
                    class="ivu-mt iuv-text-center"
                    slot="footer"
                    style="text-align: center;"
                >
                    <Page
                        show-total
                        show-elevator
                        show-sizer
                        :total="total"
                        :current.sync="params.page"
                        :page-size="params.pageSize"
                        :page-size-opts="pageOpts"
                        @on-change="changepage"
                        @on-page-size-change="changepageSize"
                    />
                </div>
            </div>
            <patient-detail
                ref="patientDetail"
                :btnShow="btnShow"
                @cancelDrawer="askData"
                @askData="askData"
            />
            <edit-patient
                ref="editPatient"
                @patientfun="askData"
                v-if="!loading"
            />
            <!-- <return-visit ref="returnVisit" /> -->
            <return-visit ref="returnVisit" @patientfuns="askData" />
            <FooterToolbar>
                <div
                    style="width:100vw;
                height:56px;display:flex;
                justify-content: center;
                align-items: center"
                >
                    <Button
                        v-hasC="{
                            name: 'patient-index-create',
                            flag: 'v1/patient/index/create',
                        }"
                        type="primary"
                        class="v-mt-20"
                        size="large"
                        :loading="addloading"
                        @click="handleOpenDrawer(-1)"
                        >新增</Button
                    >
                </div>
            </FooterToolbar>
        </div>
        <copymodal ref="copymodal" @askData="askData" :btnShow="btnShows"/>
    </Card>
</template>
<script>
import jgSearch from "@/components/search";
import patientDetail from "@/components/patientDetail";
import editPatient from "@/components/editPatient";
import returnVisit from "@/components/returnVisit";
import {
    patientindexaddlist,
    patientindexorderarrivelist,
    patientindexarrivelist,
    patientindexunarrivelist,
    patientindexoperatearrivelist,
    patientindexchangearrivelist,
    patientindexcancelarrive,
    patientindextabtotal,
    patientindexsearchcity,
    patientindexdelete,
} from "@/api/hqapi";
import mixinsaskData from "./mixinsaskData";
import mixincity from "@/mixins/mixincity";
import searchData from "./searchData";
import copymodal from "./copymodal";
import params from "./params";
import dayjs from "dayjs";
export default {
    name: "patient",
    mixins: [mixinsaskData, searchData, params, mixincity],
    components: {
        patientDetail,
        editPatient,
        returnVisit,
        jgSearch,
        copymodal,
    },
    watch: {
        city_id2(value1, value2) {
            if (value1 === "undefined" || value1 === undefined) {
                this.city_id2 = value2;
            }
        },
        city_id1(value1, value2) {
            if (value1 === "undefined" || value1 === undefined) {
                this.city_id1 = value2;
            }
        },
        city_id3(value1, value2) {
            if (value1 === "undefined" || value1 === undefined) {
                this.city_id3 = value2;
            }
        },
    },

    data() {
        return {
            btnShows:{
                    name: 'v1-patient-index-delete4',
                    flag: 'v1/patient/index/delete',
                },
            timer: "",
            loadingcity: false,
            cityfocusshow: true,
            optionscity: [],
            addloading: false,
            btnShow: [
                {
                    name: "patient-index-sub5",
                    flag: "v1/patient/index/sub",
                },
                {
                    name: "patient-index-edit-remark5",
                    flag: "v1/patient/index/edit-remark",
                },
                {
                    name: "v1-patient-index-update",
                    flag: "v1/patient/index/update",
                },
                {
                    name: "patient-callback-callback-common-list4",
                    flag: "v1/patient/callback/callback-common-list",
                },
                {
                    name: "patient-index-edit-tags10",
                    flag: "v1/patient/index/edit-tags",
                },
                {
                    name: "patient-index-edit-tags13",
                    flag: "v1/patient/index/edit-tags",
                },
            ],

            loading: true,
            currentTab: "add",
            patientindexaddlist: "",
            patientindexorderarrivelist: "",
            patientindexarrivelist: "",
            patientindexunarrivelist: "",
            patientindexoperatearrivelist: "",
            patientindexchangearrivelist: "",
        };
    },
    /* 有keep-alive缓存即会触发 */
    activated() {
        if (this.$route.query.member_id) {
            (this.params1 = {
                dialog_mode_id: "",
                created_stime: "",
                created_etime: "",
                appointment_stime: "",
                appointment_etime: "",
                revisiting_stime: "",
                revisiting_etime: "",
                operate_stime: "",
                operate_etime: "",
                keywords: "",
                channel_id: [],
                belong_member_id: "",
                patient_status_id: "",
                tags_ids: "",
                is_attention: "",
                sort_appointment_time: 0,
                sort_callback_count: 0,
                page: 1,
                pageSize: 10,
            }),
                (this.columns = this.columnslist);
            this.params1.belong_member_id = this.$route.query.member_id + "";
            this.currentTab = "add";
            this.params = JSON.parse(JSON.stringify(this.params1));
            this.addsearchData.project.forEach((item) => {
                if (item.id === 5) {
                    item.value = "";
                } else if (item.id === 4) {
                    item.value = ["", ""];
                } else if (item.id === 6) {
                    item.value = "";
                } else if (item.id === 7) {
                    item.value = this.params1.belong_member_id;
                } else if (item.id === 8) {
                    item.value = "";
                } else if (item.id === 9) {
                    item.value = "";
                } else if (item.id === 10) {
                    item.value = [];
                } else if (item.id === 18) {
                    item.value = "";
                }
            });

            this.searchData = JSON.parse(JSON.stringify(this.addsearchData));
            this.addaskData();
        }
    },
    // watch: {
    //     city_id2(value1, value2) {
    //         if (value1 === "undefined" || value1 === undefined) {
    //             this.city_id2 = value2;
    //         }
    //     },
    //     city_id1(value1, value2) {
    //         if (value1 === "undefined" || value1 === undefined) {
    //             this.city_id1 = value2;
    //         }
    //     },
    //     city_id3(value1, value2) {
    //         if (value1 === "undefined" || value1 === undefined) {
    //             this.city_id3 = value2;
    //         }
    //     },
    // },
    methods: {
        initial() {
            this.patientindexaddlist = patientindexaddlist;
            this.patientindexorderarrivelist = patientindexorderarrivelist;
            this.patientindexarrivelist = patientindexarrivelist;
            this.patientindexunarrivelist = patientindexunarrivelist;
            this.patientindexoperatearrivelist = patientindexoperatearrivelist;
            this.patientindexchangearrivelist = patientindexchangearrivelist;
            this.params1.belong_member_id = this.$route.query.member_id || "";
            this.initialparams();
            patientindextabtotal({ type: 0 }).then((res) => {
                this.totallist = res.tab_totals;
                this.condition(res);
                this.columns = this.columnslist;
                this.searchData = JSON.parse(
                    JSON.stringify(this.addsearchData)
                );
                this.searchData.project.forEach((item) => {
                    if (item.id === 4) item.options = this.options;
                });
            });
            this.addaskData();
        },
        initialparams() {
            this.addsearchData.project.forEach((item) => {
                if (item.id === 4) {
                    if (this.$route.query.member_id) {
                        item.value = ["", ""];
                    } else {
                        item.value = [new Date(), new Date()];
                    }
                    if (this.$route.query.member_id) {
                        this.params1.created_stime = "";
                        this.params1.created_etime = "";
                    } else {
                        this.params1.created_stime = item.value[0];
                        this.params1.created_etime = item.value[1];
                    }
                }
            });
            this.preArrivalsearchData.project.forEach((item) => {
                if (item.id === 4) {
                    item.value = [new Date(), new Date()];
                }
            });
            this.arrivedsearchData.project.forEach((item) => {
                if (item.id === 4) {
                    item.value = [new Date(), new Date()];
                }
            });
            this.orderedsearchData.project.forEach((item) => {
                if (item.id === 4) {
                    item.value = [new Date(), new Date()];
                }
            });
        },
        askData() {
            if (this.currentTab === "add") {
                this.addaskData();
            } else if (this.currentTab === "preArrival") {
                this.preArrivalaskData();
            } else if (this.currentTab === "arrived") {
                this.arrivedaskData();
            } else if (this.currentTab === "overdue") {
                this.overdueaskData();
            } else if (this.currentTab === "ordered") {
                this.orderedaskData();
            } else if (this.currentTab === "revision") {
                this.revisionaskData();
            }
        },
        askDatas() {
            this.cityfocusshow = false;
            setTimeout(() => {
                this.cityfocusshow = true;
            }, 1000);
            this.params = {};
            this.paramspagereset();
            this.askData();
        },
        /* @函数功能: 分页 */
        changepage(e) {
            this.params.page = e;
            this.paramsreset();
            this.askData();
        },
        /* @函数功能: 每页数量 */
        changepageSize(e) {
            this.params.pageSize = e;
            this.paramsreset();
            this.askData();
        },
        sortchange(e) {
            if (e.key === "appointment_time_str") {
                if (e.order === "desc") {
                    this.params.sort_appointment_time = 2;
                } else if (e.order === "asc") {
                    this.params.sort_appointment_time = 1;
                } else {
                    this.params.sort_appointment_time = 0;
                }
                this.params.sort_last_callback_time = 0;
                this.params.sort_callback_count = 0;
                this.params.sort_revisiting_time = 0;
                this.params.sort_created_at = 0;
            } else if (e.key === "callback_count") {
                if (e.order === "desc") {
                    this.params.sort_callback_count = 2;
                } else if (e.order === "asc") {
                    this.params.sort_callback_count = 1;
                } else {
                    this.params.sort_callback_count = 0;
                }
                this.params.sort_last_callback_time = 0;
                this.params.sort_appointment_time = 0;
                this.params.sort_revisiting_time = 0;
                this.params.sort_created_at = 0;
            } else if (e.key === "revisiting_time_str") {
                if (e.order === "desc") {
                    this.params.sort_revisiting_time = 2;
                } else if (e.order === "asc") {
                    this.params.sort_revisiting_time = 1;
                } else {
                    this.params.sort_revisiting_time = 0;
                }
                this.params.sort_last_callback_time = 0;
                this.params.sort_appointment_time = 0;
                this.params.sort_callback_count = 0;
                this.params.sort_created_at = 0;
            } else if (e.key === "uncallback_day") {
                if (e.order === "desc") {
                    this.params.sort_last_callback_time = 2;
                } else if (e.order === "asc") {
                    this.params.sort_last_callback_time = 1;
                } else {
                    this.params.sort_last_callback_time = 0;
                }
                this.params.sort_revisiting_time = 0;
                this.params.sort_appointment_time = 0;
                this.params.sort_callback_count = 0;
                this.params.sort_created_at = 0;
            } else if (e.key === "created_at_str") {
                if (e.order === "desc") {
                    this.params.sort_created_at = 2;
                } else if (e.order === "asc") {
                    this.params.sort_created_at = 1;
                } else {
                    this.params.sort_created_at = 0;
                }
                this.params.sort_revisiting_time = 0;
                this.params.sort_appointment_time = 0;
                this.params.sort_callback_count = 0;
                this.params.sort_last_callback_time = 0;
            }
            this.params.page = 1;
            this.paramsreset();
            this.askData();
        },
        handleVisit(row) {
            this.$Modal.confirm({
                title: "撤诊确认",
                content: `<p>确定给此患者撤诊吗？</p>`,
                onOk: () => {
                    patientindexcancelarrive({ id: row.id }).then(() => {
                        this.$Message.info("撤诊成功");
                        this.askData();
                    });
                },
            });
        },
        delpatient(row) {
            this.$Modal.confirm({
                title: "删除确认",
                content: `<p>删除后患者进入回收站，将不在其他列表展示</p>`,
                loading: true,
                onOk: () => {
                    patientindexdelete({ id: row.id }).then(() => {
                        this.$Message.info("删除成功");
                        this.askData();
                        this.$Modal.remove()
                    });
                },
            });
        },
        remoteMethod(query) {
            if (!this.cityfocusshow) return;
            clearTimeout(this.timer);
            if (query !== "") {
                let reg = new RegExp("[\\u4E00-\\u9FFF]+", "g");
                if (!reg.test(query)) {
                    return;
                }
                this.loadingcity = true;
                return new Promise((resolve) => {
                    this.timer = setTimeout(() => {
                        patientindexsearchcity({
                            keywords: query,
                        }).then((res) => {
                            this.query = "";
                            if (res.list && res.list.length > 0) {
                                let list = [];
                                for (let item of res.list) {
                                    list.push({
                                        value: item.value,
                                        label: item.label,
                                    });
                                }
                                if (this.currentTab === "add") {
                                    this.optionscity1 = list;
                                } else if (this.currentTab === "preArrival") {
                                    this.optionscity2 = list;
                                } else if (this.currentTab === "arrived") {
                                    this.optionscity3 = list;
                                } else if (this.currentTab === "overdue") {
                                    this.optionscity4 = list;
                                } else if (this.currentTab === "ordered") {
                                    this.optionscity5 = list;
                                } else if (this.currentTab === "revision") {
                                    this.optionscity6 = list;
                                }
                            }
                            resolve(res.data);
                        });
                        this.loadingcity = false;
                    }, 200);
                });
            }
        },
        getcityDatas() {
            if (!this.cityfocusshow) return;
            this.getDatas();
        },
        copypatient(row) {
            this.$refs.copymodal.initial(row.id);
        },
    },
};
</script>
<style>
.sky-patient .ivu-tabs-bar {
    border: none;
    margin-bottom: 0px;
}
</style>
